<?php
namespace  plugin\banmitongcheng\admin; 
use  plugin\banmitongcheng\model\PluginBanmiTongchengShopPay; 
use  plugin\banmitongcheng\validate\ShoppayValidate;
use app\admin\common\Baseadmin;


class Shoppay extends Baseadmin
{
       
      /**
      * @notes  adopt 
      * @variable  id=id;status=; 
      * @date 2023-03-23 15:01:35
      * @author 半米科技低代码一键生成
      */
      public function   updates_adopt(){  
             $request= (new ShoppayValidate())->IsCheck('adopt');
             $field=["status"];
             $request['status']= 2;
             $map=[
                  ['id',	'='   ,    input('request.id')  ],
                  ];
             $model =(new PluginBanmiTongchengShopPay())->updates($map,$request,$field);
              if($model){
               ajaxmsg('更新成功', 200);
              }
               ajaxmsg('更新失败', 0);  
      }
       
      /**
      * @notes  del 
      * @variable  id=id;status=; 
      * @date 2023-03-23 15:01:38
      * @author 半米科技低代码一键生成
      */
      public function   updates_del(){  
             $request= (new ShoppayValidate())->IsCheck('del');
             $field=["status"];
             $request['status']= -1;
             $map=[
                  ['id',	'='   ,    input('request.id')  ],
                  ];
             $model =(new PluginBanmiTongchengShopPay())->updates($map,$request,$field);
              if($model){
               ajaxmsg('更新成功', 200);
              }
               ajaxmsg('更新失败', 0);  
      }
       
      /**
      * @notes  refuse 
      * @variable  id=id;status=;refuse_text=拒绝原因; 
      * @date 2023-03-23 15:01:41
      * @author 半米科技低代码一键生成
      */
      public function   updates_refuse(){  
             $request= (new ShoppayValidate())->IsCheck('refuse');
             $field=["status","refuse_text"];
             $request['status']= 0;
             $map=[
                  ['id',	'='   ,    input('request.id')  ],
                  ];
             $model =(new PluginBanmiTongchengShopPay())->updates($map,$request,$field);
              if($model){
               ajaxmsg('更新成功', 200);
              }
               ajaxmsg('更新失败', 0);  
      }
       
      /**
      * @notes  查询会员列表 
      * @variable   
      * @date 2023-03-23 15:01:44
      * @author 半米科技低代码一键生成
      */
      public function   paginate_cxhylb(){  
             $request= (new ShoppayValidate())->IsCheck();
             $field="id,order,time,voen_pay_id,is_pay,pay_type,uid,transaction_id,total_fee";
             $map=[
                  ];
             $model =(new PluginBanmiTongchengShopPay())->paginate($map,$field);
             $data['list']=$model;
             ajaxmsg('ok', 200,$data);  
      }
      //控制器方法
    
    
    
}